﻿using System;
using GMS.Models.Entity;
using System.Collections.Generic;
using System.Threading.Tasks;
using GMS.Models.Dto;
using GMS.Models.ResponseDto;
using GMS.Models.SearchDto;

namespace GMS.IServices
{
    public interface IMenuInfoService
    {
        Task<IEnumerable<MenuInfoDto>> GetAllAsync(MenuInfoSearchDto dto);

        Task<List<MenuInfoResponseDto>> GetTierAllAsync();

        Task<int> AddAsync(MenuInfoDto dto);
        Task<IEnumerable<MenuInfo>> GetMenusAsync(Guid parentId);
        Task<IEnumerable<MenuInfo>> GetLevelAsync();
        Task<int> DeleteAsync(Guid id);

        /// <summary>
        /// TODO:这里可以使用 MemoryCache() 进行缓存起来 因为一直不会变
        /// </summary>
        /// <returns></returns>
        Task<MenuInfo> GetTopLevel();

        Task<int> UpdatedAsync(MenuInfo entity);
        Task<List<MenuInfoResponseDto>> GetTierAsync();
        Task<IEnumerable<MenuInfoResponseDto>> GetTierMenusByUserAsync(Guid userId);
    }
}
